﻿<%@ Control Language="C#" EnableViewState="true" %>
<%@ Register Assembly="Antu.WebControls" Namespace="Antu.WebControls" TagPrefix="CBW" %>
<style type="text/css">
    #ctl00_MainerRegion_ZS_BCFAControl___GridList_Div1 {
        border-collapse: collapse;
        border: 1px solid #74a4c0;
        background-color: #FFFFFF;
        text-align: center;
        color: #a30101;
    }
</style>
<script type="text/javascript">
    var arrProjectInfo = new Array(); /*保存项目信息*/
    var url = document.URL;
    var strurl = url.substring(url.indexOf("?") + 1, url.length).split("&");
    var tt = strurl[0].substring(strurl[0].indexOf("=") + 1, strurl[0].length);
    /*返回选中的项目信息*/
    function GetSelectProjectInfo() {
        if (document.getElementById("project_id").value == '') {
            alert('请选择数据!');
            return;
        }
        arrProjectInfo.length = 0;
        var id = document.getElementById("project_id").value; /*项目编号*/
        var row = document.getElementById(id);               /*返回table的一行*/

        arrProjectInfo[0] = id;

        if (row != undefined) {
            if (row.cells[2].innerText != '') {
                if (tt == "yyfh" || tt == "fyyfh") {
                    arrProjectInfo[1] = row.cells[2].innerText;/*产权人*/
                    arrProjectInfo[2] = row.cells[3].innerText;/*丘权号*/
                    arrProjectInfo[3] = row.cells[4].innerText;/*房屋坐落*/
                    arrProjectInfo[4] = row.cells[5].innerText; /*房屋权证编号*/
                    arrProjectInfo[5] = row.cells[6].innerText;/*房屋建筑面积*/
                    arrProjectInfo[6] = row.cells[7].innerText; /*承租人*/
                    arrProjectInfo[7] = row.cells[8].innerText; /*房屋用途*/
                    arrProjectInfo[8] = row.cells[9].innerText; /*使用性质*/
                    arrProjectInfo[9] = row.cells[10].innerText; /*房屋结构*/
                    arrProjectInfo[10] = row.cells[11].innerText; /*所属层次*/
                    arrProjectInfo[11] = row.cells[12].innerText; /*土地权证编号*/
                    arrProjectInfo[12] = row.cells[13].innerText; /*土地分摊面积*/
                    arrProjectInfo[13] = row.cells[14].innerText; /*征收区位等级*/
                    arrProjectInfo[14] = row.cells[15].innerText; /*所属类别    */
                }
                if (tt == "snfh") {
                    arrProjectInfo[1] = row.cells[2].innerText;/*产权人*/
                    arrProjectInfo[2] = row.cells[3].innerText;/*丘权号*/
                    arrProjectInfo[3] = row.cells[4].innerText;/*房屋坐落*/
                    arrProjectInfo[4] = row.cells[5].innerText; /*房屋权证编号*/
                    arrProjectInfo[5] = row.cells[6].innerText;/*房屋建筑面积*/
                    arrProjectInfo[6] = row.cells[7].innerText; /*承租人*/
                    arrProjectInfo[7] = row.cells[8].innerText; /*使用性质*/
                    arrProjectInfo[8] = row.cells[9].innerText; /*房屋结构*/
                    arrProjectInfo[9] = row.cells[10].innerText; /*所属层次*/
                    arrProjectInfo[10] = row.cells[11].innerText; /*征收区位等级*/
                }
                if (tt == "zzfh") {
                    arrProjectInfo[1] = row.cells[2].innerText; /*产权人*/
                    arrProjectInfo[2] = row.cells[3].innerText; /*丘权号*/
                    arrProjectInfo[3] = row.cells[4].innerText; /*房屋坐落*/
                    arrProjectInfo[4] = row.cells[5].innerText; /*房屋权证编号*/
                    arrProjectInfo[5] = row.cells[6].innerText; /*房屋建筑面积*/
                    arrProjectInfo[6] = row.cells[7].innerText; /*承租人*/
                    arrProjectInfo[7] = row.cells[8].innerText; /*所属层次*/
                    arrProjectInfo[8] = row.cells[9].innerText; /*土地权证编号*/
                    arrProjectInfo[9] = row.cells[10].innerText; /*土地分摊面积*/
                    arrProjectInfo[10] = row.cells[11].innerText; /*征收区位等级*/
                }
                if (tt == "zzhz") {
                    arrProjectInfo[1] = row.cells[2].innerText;/*产权人*/
                    arrProjectInfo[2] = row.cells[3].innerText;/*丘权号*/
                    arrProjectInfo[3] = row.cells[4].innerText;/*房屋坐落*/
                    arrProjectInfo[4] = row.cells[5].innerText; /*房屋权证编号*/
                    arrProjectInfo[5] = row.cells[6].innerText;/*房屋建筑面积*/
                    arrProjectInfo[6] = row.cells[7].innerText;/*承租人*/
                    arrProjectInfo[7] = row.cells[8].innerText; /*房屋结构*/
                    arrProjectInfo[8] = row.cells[9].innerText;/*所属层次*/
                }
                if (tt == "fzzhz") {
                    arrProjectInfo[1] = row.cells[2].innerText;/*产权人*/
                    arrProjectInfo[2] = row.cells[3].innerText;/*丘权号*/
                    arrProjectInfo[3] = row.cells[4].innerText;/*房屋坐落*/
                    arrProjectInfo[4] = row.cells[5].innerText; /*房屋权证编号*/
                    arrProjectInfo[5] = row.cells[6].innerText;/*房屋建筑面积*/
                    arrProjectInfo[6] = row.cells[7].innerText;/*承租人*/
                    arrProjectInfo[7] = row.cells[8].innerText; /*房屋结构*/
                    arrProjectInfo[8] = row.cells[9].innerText;/*所属层次*/
                    arrProjectInfo[9] = row.cells[10].innerText; /*房屋用途*/
                    arrProjectInfo[10] = row.cells[11].innerText;/*所属类别*/
                }
                if (tt == "bdry") {
                    arrProjectInfo[1] = row.cells[2].innerText;/*产权人*/
                    arrProjectInfo[2] = row.cells[3].innerText;/*承租人*/
                    arrProjectInfo[3] = row.cells[4].innerText;/*房屋坐落*/

                }
                if (tt == "xfzdry") {
                    arrProjectInfo[1] = row.cells[2].innerText;/*姓名*/
                    arrProjectInfo[2] = row.cells[3].innerText;/*性别*/
                    arrProjectInfo[3] = row.cells[4].innerText;/*身份证号*/
                    arrProjectInfo[4] = row.cells[5].innerText;/*住址*/
                    arrProjectInfo[5] = row.cells[6].innerText;/*电话*/
                    arrProjectInfo[6] = row.cells[7].innerText;/*单位*/
                    arrProjectInfo[7] = row.cells[9].title;/*PNID*/
                }
            }
        }

        window.returnValue = arrProjectInfo;
        self.close();
    }
    function setValue(obj) {
        var element = document.getElementsByTagName("input");

        if (element.length > 0) {
            for (var i = 0; i < element.length; i++)
                if (element[i].type == 'radio')
                    element[i].checked = false;
        }
        obj.checked = true;
        document.getElementById("project_id").value = obj.id;
    }

    function setNull() {
        arrProjectInfo.length = 0;
    }
    function request(paras) {
        var url = location.href;
        var paraString = url.substring(url.indexOf("?") + 1, url.length).split("&");
        var returnValue;
        for (i = 0; i < paraString.length; i++) {
            if (paraString[i] != "") {
                if (paras.toString().toLowerCase() == paraString[i].substring(0, paraString[i].indexOf("=")).toLowerCase()) {
                    returnValue = paraString[i].substring(paraString[i].indexOf("=") + 1, paraString[i].length)
                }
            }
        }
        if (typeof (returnValue) == "undefined") {
            return "";
        } else {
            return returnValue;
        }
    }
    window.onload = function aa() {
        var type = '<%=HttpContext.Current.Request["TYPE"] %>';
            var t1 = document.getElementById('span1');
            var t2 = document.getElementById('tr1');
            if (type == 'xfzdry') { t1.innerHTML = "信访人员"; t2.style.display = "none"; }
        };
</script>
<center>
        <table border="0" cellpadding="0" cellspacing="0" width="100%" class="window_tab_list">
            <tr>
                <th height="30px">
                    <strong>选择<span id="span1">征收项目人员</span></strong>
                </th>
            </tr>
            <tr id="tr1">
                <td>
                    产权人:<asp:TextBox ID="txt_name" runat="server" Width="100"></asp:TextBox>&nbsp;
                    承租人:<asp:TextBox ID="txtCZRName" runat="server" Width="100"></asp:TextBox>&nbsp;
                    房屋坐落:<asp:TextBox ID="txtFWZL" runat="server" Width="100"></asp:TextBox>
                    <asp:Button ID="bt_query" runat="server" Text="查询" />
                </td>
            </tr>
            <tr>
                <td width="100%">
                    <CBW:CustomGridView runat="server" ID="CustomGridList1" ShowCmpAndCancel="false"
                        ShowGridViewSelect="List" ShowHideColModel="None" PageSize="10" AllowPaging="true" 
                        Width="100%" AutoGenerateColumns="true"  CustomGridViewClass="window_tab_list_fst">
                        <Columns>
                        </Columns>
                    </CBW:CustomGridView>
                </td>
            </tr>
            <tr>
                <td align="center" height="30px">
                    <asp:Button ID="bt_ok" runat="server" Text="确定" OnClientClick="GetSelectProjectInfo();return false;" />
                    <asp:Button ID="bt_cancel" runat="server" Text="关闭" OnClientClick="javascript:self.close();return false;" />
                </td>
            </tr>
        </table>
    </center>
<input type="hidden" value="" id="project_id" />